home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / MosaicSRC / src / locale.c < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-13  |  7.6 KB  |  196 lines

  1. /****************************************************************
  2.    This file was created automatically by `FlexCat V1.0'
  3.    Do NOT edit by hand!
  4. ****************************************************************/
  5.  
  6. #include "amosaic_cat.h"
  7. #include <proto/locale.h>
  8.  
  9. static LONG amosaic_Version = 1;
  10. static const STRPTR amosaic_BuiltInLanguage = (STRPTR) "english";
  11.  
  12. struct FC_Type
  13. {   LONG   ID;
  14.     STRPTR Str;
  15. };
  16.  
  17.  
  18. static const struct FC_Type amosaic_Array [] =
  19. {
  20.     MSG_MENU_PROJECT, (STRPTR) "Project",
  21.     MSG_MENU_OPEN_URL, (STRPTR) "Open URL...",
  22.     MSG_MENU_OPEN_URL_SC, (STRPTR) "O",
  23.     MSG_MENU_OPEN_LOCAL, (STRPTR) "Open Local...",
  24.     MSG_MENU_OPEN_LOCAL_SC, (STRPTR) "L",
  25.     MSG_MENU_RELOAD_CURRENT, (STRPTR) "Reload Current",
  26.     MSG_MENU_RELOAD_CURRENT_SC, (STRPTR) "R",
  27.     MSG_MENU_REFRESH_CURRENT, (STRPTR) "Refresh Current",
  28.     MSG_MENU_URL_TO_CLIPBOARD, (STRPTR) "Copy URL to clipboard",
  29.     MSG_MENU_URL_TO_CLIPBOARD_SC, (STRPTR) "C",
  30.     MSG_MENU_CLIPBOARD_TO_URL, (STRPTR) "Paste clipboard to URL",
  31.     MSG_MENU_CLIPBOARD_TO_URL_SC, (STRPTR) "V",
  32.     MSG_MENU_FIND_IN_CURRENT, (STRPTR) "Find in Current...",
  33.     MSG_MENU_FIND_IN_CURRENT_SC, (STRPTR) "/",
  34.     MSG_MENU_VIEW_SOURCE, (STRPTR) "View Source...",
  35.     MSG_MENU_VIEW_SOURCE_SC, (STRPTR) "S",
  36.     MSG_MENU_SAVE_AS, (STRPTR) "Save As...",
  37.     MSG_MENU_SAVE_AS_SC, (STRPTR) "A",
  38.     MSG_MENU_PRINT, (STRPTR) "Print...",
  39.     MSG_MENU_PRINT_SC, (STRPTR) "P",
  40.     MSG_MENU_ABOUT, (STRPTR) "About...",
  41.     MSG_MENU_ABOUT_SC, (STRPTR) "?",
  42.     MSG_MENU_QUIT, (STRPTR) "Quit",
  43.     MSG_MENU_QUIT_SC, (STRPTR) "Q",
  44.     MSG_MENU_EDIT, (STRPTR) "Edit",
  45.     MSG_MENU_COPY, (STRPTR) "Copy",
  46.     MSG_MENU_COPY_SC, (STRPTR) " ",
  47.     MSG_MENU_OPTIONS, (STRPTR) "Options",
  48.     MSG_MENU_LOAD_TO_DISK, (STRPTR) "Load To Local Disk",
  49.     MSG_MENU_LOAD_TO_DISK_SC, (STRPTR) "T",
  50.     MSG_MENU_DELAY_IMAGE_LOADING, (STRPTR) "Delay Image Loading",
  51.     MSG_MENU_DELAY_IMAGE_LOADING_SC, (STRPTR) "D",
  52.     MSG_MENU_LOAD_IMAGES, (STRPTR) "Load Images In Current",
  53.     MSG_MENU_LOAD_IMAGES_SC, (STRPTR) "I",
  54.     MSG_MENU_ISINDEX_TO_FORM, (STRPTR) "Isindex -> Form",
  55.     MSG_MENU_BUTTONS, (STRPTR) "Buttons",
  56.     MSG_MENU_TEXT_ONLY, (STRPTR) "Text only",
  57.     MSG_MENU_TEXT_ONLY_SC, (STRPTR) "-",
  58.     MSG_MENU_IMAGES_ONLY, (STRPTR) "Images only",
  59.     MSG_MENU_IMAGES_ONLY_SC, (STRPTR) "=",
  60.     MSG_MENU_IMAGES_AND_TEXT, (STRPTR) "Images & Text",
  61.     MSG_MENU_IMAGES_AND_TEXT_SC, (STRPTR) "\\",
  62.     MSG_MENU_FLUSH_IMAGE_CACHE, (STRPTR) "Flush Image Cache",
  63.     MSG_MENU_FLUSH_IMAGE_CACHE_SC, (STRPTR) "X",
  64.     MSG_MENU_CLEAR_GLOBAL_HISTORY, (STRPTR) "Clear Global History",
  65.     MSG_MENU_CLEAR_GLOBAL_HISTORY_SC, (STRPTR) "G",
  66.     MSG_MENU_NAVIGATE, (STRPTR) "Navigate",
  67.     MSG_MENU_BACK, (STRPTR) "Back",
  68.     MSG_MENU_BACK_SC, (STRPTR) "B",
  69.     MSG_MENU_FORWARD, (STRPTR) "Forward",
  70.     MSG_MENU_FORWARD_SC, (STRPTR) "F",
  71.     MSG_MENU_HOME_DOCUMENT, (STRPTR) "Home Document",
  72.     MSG_MENU_HOME_DOCUMENT_SC, (STRPTR) "H",
  73.     MSG_MENU_WINDOW_HISTORY, (STRPTR) "Window History",
  74.     MSG_MENU_WINDOW_HISTORY_SC, (STRPTR) "W",
  75.     MSG_MENU_HOTLIST, (STRPTR) "Hotlist... (rexx)",
  76.     MSG_MENU_HOTLIST_SC, (STRPTR) "J",
  77.     MSG_MENU_ADD_HOTLIST, (STRPTR) "Add Current To Hotlist (rexx)",
  78.     MSG_MENU_ADD_HOTLIST_SC, (STRPTR) "E",
  79.     MSG_MENU_REXX, (STRPTR) "Rexx",
  80.     MSG_MENU_MACRO, (STRPTR) "Macro",
  81.     MSG_MENU_MACRO_SC, (STRPTR) "M",
  82.     MSG_GADGET_TITLE, (STRPTR) "Title:",
  83.     MSG_GADGET_URL, (STRPTR) "URL:",
  84.     MSG_HOTLIST_ADD, (STRPTR) "Add",
  85.     MSG_HOTLIST_NEW, (STRPTR) "New...",
  86.     MSG_HOTLIST_DELETE, (STRPTR) "Delete",
  87.     MSG_HOTLIST_EDIT, (STRPTR) "Edit...",
  88.     MSG_HOTLIST_SORT, (STRPTR) "Sort",
  89.     MSG_HOTLIST_MOVE, (STRPTR) "Move",
  90.     MSG_HOTLIST_PARENT, (STRPTR) "Parent",
  91.     MSG_HOTLIST_EDITGROUP_TITLE, (STRPTR) "Edit hotlist group entry",
  92.     MSG_HOTLIST_GROUP_DEFAULTNAME, (STRPTR) "(Unnamed)",
  93.     MSG_HOTLIST_EDIT_WINDOW_TITLE, (STRPTR) "Edit hotlist entry",
  94.     MSG_HOTLIST_EDIT_TITLE, (STRPTR) "Title:",
  95.     MSG_HOTLIST_EDIT_URL, (STRPTR) "URL:",
  96.     MSG_HOTLIST_EDIT_OK, (STRPTR) "_Ok",
  97.     MSG_HOTLIST_EDIT_CANCEL, (STRPTR) "_Cancel",
  98.     MSG_BUTTON_BACK, (STRPTR) "Back",
  99.     MSG_BUTTON_BACK_SC, (STRPTR) "b",
  100.     MSG_BUTTON_FORWARD, (STRPTR) "Forward",
  101.     MSG_BUTTON_FORWARD_SC, (STRPTR) "f",
  102.     MSG_BUTTON_RELOAD, (STRPTR) "Reload",
  103.     MSG_BUTTON_RELOAD_SC, (STRPTR) "r",
  104.     MSG_BUTTON_HOME, (STRPTR) "Home",
  105.     MSG_BUTTON_HOME_SC, (STRPTR) "h",
  106.     MSG_BUTTON_OPEN, (STRPTR) "Open...",
  107.     MSG_REQ_URL_TITLE, (STRPTR) "Open Document",
  108.     MSG_REQ_URL_URL, (STRPTR) "URL To Open:",
  109.     MSG_REQ_URL_OPEN, (STRPTR) "_Open",
  110.     MSG_REQ_URL_CLEAR, (STRPTR) "C_lear",
  111.     MSG_REQ_URL_CANCEL, (STRPTR) "_Cancel",
  112.     MSG_WIN_SOURCE_TITLE, (STRPTR) "Document_Source",
  113.     MSG_REQ_FINDRESULT_TITLE, (STRPTR) "Amiga Mosaic: Find Result",
  114.     MSG_REQ_FINDRESULT_NO_MATCHES, (STRPTR) "Sorry, no matches in this document.",
  115.     MSG_REQ_FINDRESULT_NO_MORE_MATCHES, (STRPTR) "Sorry, no more matches in this document.",
  116.     MSG_REQ_FINDRESULT_OK, (STRPTR) "_Ok",
  117.     MSG_REQ_FIND_TITLE, (STRPTR) "Find in Document",
  118.     MSG_REQ_FIND_STRING, (STRPTR) "Find string in document:",
  119.     MSG_REQ_FIND_CASELESS, (STRPTR) "Caseless search:",
  120.     MSG_REQ_FIND_BACKWARDS, (STRPTR) "Backwards search:",
  121.     MSG_REQ_FIND_FIND, (STRPTR) "_Find",
  122.     MSG_REQ_FIND_CLEAR, (STRPTR) "C_lear",
  123.     MSG_REQ_FIND_CANCEL, (STRPTR) "_Cancel",
  124.     MSG_REQ_SAVE_FILEREQ_TITLE, (STRPTR) "Save as...",
  125.     MSG_REQ_SAVE_FILEREQ_POSTEXT, (STRPTR) "Save",
  126.     MSG_REQ_SAVE_TITLE, (STRPTR) "Save Document",
  127.     MSG_REQ_SAVE_FILEFORMAT, (STRPTR) "File format:",
  128.     MSG_REQ_SAVE_FILEFORMAT_PLAIN, (STRPTR) "Plain Text",
  129.     MSG_REQ_SAVE_FILEFORMAT_FORMATTED, (STRPTR) "Formatted Text",
  130.     MSG_REQ_SAVE_FILEFORMAT_HTML, (STRPTR) "HTML",
  131.     MSG_REQ_SAVE_FILE, (STRPTR) "File to save:",
  132.     MSG_REQ_SAVE_SAVE, (STRPTR) "_Save",
  133.     MSG_REQ_SAVE_CLEAR, (STRPTR) "C_lear",
  134.     MSG_REQ_SAVE_CANCEL, (STRPTR) "_Cancel",
  135.     MSG_REQ_SAVEBINARY_TITLE, (STRPTR) "Save as...",
  136.     MSG_REQ_SAVEBINARY_POSTEXT, (STRPTR) "Save",
  137.     MSG_REQ_ABOUT_TITLE, (STRPTR) "About Amiga Mosaic",
  138.     MSG_REQ_ABOUT_OK, (STRPTR) "_Ok",
  139.     MSG_REQ_OPEN_LOCAL_TITLE, (STRPTR) "Select File",
  140.     MSG_REQ_MACRO_TITLE, (STRPTR) "Rexx Macro",
  141.     MSG_REQ_MACRO_MACRO, (STRPTR) "Macro:",
  142.     MSG_REQ_MACRO_RUN, (STRPTR) "_Run",
  143.     MSG_REQ_MACRO_CLEAR, (STRPTR) "C_lear",
  144.     MSG_REQ_MACRO_CANCEL, (STRPTR) "_Cancel",
  145.     MSG_REQ_MACRO_FILEREQ_TITLE, (STRPTR) "Select Script",
  146.     MSG_REQ_FORM_READY, (STRPTR) "The images in the current form has been loaded",
  147.     MSG_REQ_SHOW_THEM, (STRPTR) "Show them",
  148.     MSG_REQ_CONSTRUCTING, (STRPTR) "Constructing form, please wait...",
  149. };
  150.  
  151.  
  152. static struct Catalog *amosaic_Catalog = NULL;
  153.  
  154. void OpenamosaicCatalog(struct Locale *loc, STRPTR language)
  155. { LONG tag, tagarg;
  156.   extern struct Library *LocaleBase;
  157.  
  158.   if (language == NULL)
  159.   { tag = TAG_IGNORE;
  160.   }
  161.   else
  162.   { tag = OC_Language;
  163.     tagarg = (LONG) language;
  164.   }
  165.   if (LocaleBase != NULL  &&  amosaic_Catalog == NULL)
  166.   { amosaic_Catalog = OpenCatalog(loc, (STRPTR) "amosaic.catalog",
  167.                  OC_BuiltInLanguage, amosaic_BuiltInLanguage,
  168.                  tag, tagarg,
  169.                  OC_Version, amosaic_Version,
  170.                  TAG_DONE);
  171.   }
  172. }
  173.  
  174. void CloseamosaicCatalog(void)
  175. { if (LocaleBase != NULL)
  176.   { CloseCatalog(amosaic_Catalog);
  177.   }
  178.   amosaic_Catalog = NULL;
  179. }
  180.  
  181. STRPTR GetamosaicString(LONG strnum)
  182. { STRPTR defaultstr = NULL;
  183.   LONG i;
  184.  
  185.   for (i = 0;  i < sizeof(amosaic_Array)/sizeof(struct FC_Type);  i++)
  186.     { if (amosaic_Array[i].ID == strnum)
  187.       { defaultstr = amosaic_Array[i].Str;
  188.     break;
  189.       }
  190.     }
  191.   if (amosaic_Catalog == NULL)
  192.   { return(defaultstr);
  193.   }
  194.   return(GetCatalogStr(amosaic_Catalog, strnum, defaultstr));
  195. }
  196.